<?php
namespace Home\Controller;
//意见反馈
use Common\Controller\MemberbaseController;

class FeedbackController extends MemberbaseController {

    public function _initialize() {
        parent::_initialize();

    }

    public function index(){
        $this->display();
    }

    public function add_post(){
        $member = $this->getMember();

        $data['feedback_content'] = I('post.feedBack');
        $data['create_member'] = $member['telephone'];
        $data['create_time'] = get_admin_time();

        $feedback_model = M('feedback');
        $id = $feedback_model->add($data);
        if ($id > 0){
            $success = array("code"=>200,"message"=>'ok');
        }else{
            $success = array("code"=>400,"message"=>'网络错误');
        }
        $this->ajaxReturn($success);
    }

}


